var EntityView = Ext.extend(Ext.Panel, {
    fullscreen: true,
    layout: 'fit',
    hidden: true,
    initComponent: function() {
    	this.items = [{xtype: 'formpanel', items: [this.fieldsetConfig]}];
    	this.dockedItems = [
			{xtype: 'toolbar', dock: 'top', title: this.title,
				items: [
					{text: 'Назад', ui: 'back', scope: this,
						handler: function() {
							Ext.dispatch({
				                controller: 'Navigator',
				                action: 'back'
				            });
						}
					}
				]
			}
    	];
    	EntityView.superclass.initComponent.apply(this, arguments);
    },
    onShow: function() {
        EntityView.superclass.onShow.apply(this, arguments);
        this.down('form').load(this.entityRecord);
    },
    listeners: {
    	hide: function(panel) {
    		panel.readyDestroy && panel.destroy();
    	}
    }
});